package com.yanqu.road.entity.config.badge;

import com.yanqu.road.utils.string.StringUtils;

import java.util.ArrayList;
import java.util.List;

public class BadgeConfig {
    private int id;
    private int level;
    private int type;
    private long unlockValue;
    private String skillsList;
    private String specialEffect;
    private String exParam;
    private String seasonParam;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public long getUnlockValue() {
        return unlockValue;
    }

    public void setUnlockValue(long unlockValue) {
        this.unlockValue = unlockValue;
    }

    public String getSkillsList() {
        return skillsList;
    }

    public void setSkillsList(String skillsList) {
        this.skillsList = skillsList;
    }

    public String getSpecialEffect() {
        return specialEffect;
    }

    public void setSpecialEffect(String specialEffect) {
        this.specialEffect = specialEffect;
    }

    public String getExParam() {
        return exParam;
    }

    public void setExParam(String exParam) {
        this.exParam = exParam;
    }

    public List<Integer> getSkillIdList() {
        ArrayList<Integer> integerArrayList = new ArrayList<>();
        String[] strings = this.skillsList.split("\\|");
        for (String s : strings) {
            int i = Integer.parseInt(s);
            integerArrayList.add(i);
        }
        return integerArrayList;
    }

    public String getSeasonParam() {
        return seasonParam;
    }

    public void setSeasonParam(String seasonParam) {
        this.seasonParam = seasonParam;
    }

    public List<Integer> getSeasonParamList() {
        return StringUtils.stringToIntegerList(seasonParam, "\\|");
    }
}
